package com.wondream.myframework.io;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;

public class BufferedReaderTest {

    Log logger = LogFactory.getLog(BufferedReaderTest.class);

    public static void main(String[] args) {
        BufferedReader br = null;
        try{
            File file = new File("./logs/buffered.txt");
            br = new BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF-8"));
            String var1 = null;
            if((var1 = br.readLine())!=null){
                System.out.println(var1);
            }
        } catch (Exception e){

        } finally {
            try {
                if(br!=null){
                    br.close();
                    br = null;
                }
            } catch (Exception e){}
        }
    }
}
